//
//  UMPushBean.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/3/15.
//

import Foundation
class UMPushAndroidBean : Codable {
    var appkey = "660515e68d21b86a18490c27"  //android key
    var timestamp : Int64 = 0
    var type = "customizedcast" //unicast单播   broadcast//广播  ，customizedcast别名推送
    var alias_type = "自定义类型"
    var production_mode = !isDebug
    
    var payload : Payload
    var alias : String
    var description : String
    var channel_properties = Properties()
    
    init(timestamp: Int64, alias: String, title: String, content: String) {
        payload = Payload(title: title, text: content)
        self.timestamp = timestamp
        self.description = content
        self.alias = alias
    }
    
    class Payload : Codable {
        
        init(title : String, text: String) {
            self.body = Body(title: title, text : text)
        }
        
        var display_type = "notification"
        var body : Body
        
        class Body : Codable {
            var title : String
            var text : String
            var after_open = "go_app"
            init(title: String, text: String) {
                self.title = title
                self.text = text
            }
            
        }
    }
    
    class Properties : Codable {
        var channel_activity = "com.module.launcher.view.MainActivity"// 系统弹窗
        var xiaomi_channel_id = "131010"
        var vivo_category = "IM"
        var vivo_addbadge = false //角标
        var oppo_channel_id = "push_oplus_category_service"
        var oppo_category = "IM"
        var oppo_notify_level = "16"
        var huawei_channel_importance = "NORMAL"
        var huawei_channel_category = "MARKETING"
        var channel_fcm = "0" //可选，fcm通道开关，0不使用，1使用
    }
}
